﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Fastyou.WCF.Contracts;
using Fastyou.Model;

namespace Fastyou.WCF.Contracts
{
    [ServiceContract(CallbackContract = typeof(IDuplexCallback),SessionMode=SessionMode.Required)]
    public interface IDuplex
    {
        [OperationContract(IsOneWay = true, IsTerminating = false, IsInitiating = true)]
        void Start();

        [OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
        void DoWork(string jobName);

        [OperationContract(IsOneWay = false, IsInitiating = false, IsTerminating = false)]
        List<Work> Jobs();

        [OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
        void AddJob(Work job);
    }
}
